/**
 *   Copyright 2014 Royce Remulla
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package cjcast.y2010.qual;


/**
 * Store Credit problem case bean.
 * 
 * <pre>
 * $Author: royce.com@gmail.com $ 
 * $Date: 2015-02-03 03:44:46 +0000 (Tue, 03 Feb 2015) $ 
 * $HeadURL: http://codejam-cast.googlecode.com/svn/trunk/src/main/java/cjcast/y2010/qual/StoreCreditBean.java $
 * </pre>
 * 
 * @author r39
 */
public class StoreCreditBean {


    /** credit amount. */
    private final transient int credit;

    /** item prices. */
    private final transient int[] prices;


    /**
     * @param pCredit credit amount, greater than 0.
     * @param pPrices item prices, each item greater than 0, only one
     *            combination will sum up to <code>credit</code>
     */
    protected StoreCreditBean(final int pCredit, final int... pPrices) {
        this.credit = pCredit;
        this.prices = new int[pPrices.length];
        System.arraycopy(pPrices, 0, this.prices, 0, pPrices.length);
    }

    /**
     * @return the credit
     */
    public int getCredit()
    {
        return this.credit;
    }

    /**
     * @return the prices
     */
    public int[] getPrices()
    {
        return this.prices.clone();
    }

}